<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>date的用法</title>
		<script>
			//var d=new Date();
			//alert(d);
			//alert(d.getDay());
			//alert(d.toGMTString());
			
			//document.write(d.toLocaleString());
			function init()
			{
				var d1=new Date();
			    var str=d1.getHours()+":"+d1.getMinutes()+":"+d1.getSeconds();
			    document.getElementById("time").innerHTML=str;
			}
			
		</script>
	</head>
	<body onload="init()">
		<div id="time"></div>
	</body>
</html>
